home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / ularn / patch2b < prev   
Encoding:
Internet Message Format  |  1989-07-20  |  57.7 KB

  1. Path: uunet!zephyr!tektronix!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v07i043:  ularn - ultra-larn, an enhancement of the larn adventure game, Patch2b
  5. Message-ID: <4282@tekred.CNA.TEK.COM>
  6. Date: 19 Jul 89 14:14:32 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2325
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: "Scott S. Snyder" <ssnyder@tybalt.caltech.edu>
  12. Posting-number: Volume 7, Issue 43
  13. Archive-name: ularn/Patch2b
  14. Patch-To: ularn: Volume 7, Issue 1-9
  15.  
  16.  
  17. #! /bin/sh
  18. # This is a shell archive, meaning:
  19. # 1. Remove everything above the #! /bin/sh line.
  20. # 2. Save the resulting text in a file.
  21. # 3. Execute the file with /bin/sh (not csh) to create the files:
  22. #    patch02.2
  23. # This archive created: Sun Jul 16 07:21:36 1989
  24. export PATH; PATH=/bin:$PATH
  25. echo shar: extracting "'patch02.2'" '(55551 characters)'
  26. if test -f 'patch02.2'
  27. then
  28.     echo shar: will not over-write existing file "'patch02.2'"
  29. else
  30. sed 's/^X//' << \SHAR_EOF > 'patch02.2'
  31. Xdiff -c orig/main.c new/main.c
  32. X*** orig/main.c    Sun Jul 16 01:07:05 1989
  33. X--- new/main.c    Sun Jul 16 04:51:44 1989
  34. X***************
  35. X*** 19,25 ****
  36. X--- 19,42 ----
  37. X      don't showcell in the main loop */
  38. X  
  39. X  char restorflag=0;    /* 1 means restore has been done    */
  40. X+ #ifdef __MSDOS__
  41. X+ 
  42. X  static char cmdhelp[] = "\
  43. X+ Cmd line format: Ularn [-slicnh] [-o<optsfile>] [-##] [++] name\n\
  44. X+   -s   show the scoreboard\n\
  45. X+   -i   show scoreboard with inventories\n\
  46. X+   -c   create new scoreboard (wizard only)\n\
  47. X+   -n   suppress welcome message on starting game\n\
  48. X+   -h   print this help text\n\
  49. X+   -o<optsfile>   specify options file to be used instead of \".Ularnopts\"\n\
  50. X+   -##  specify level of difficulty (example: Ularn -5)\n\
  51. X+   ++  restore game checkpoint file\n";
  52. X+ 
  53. X+ char larnpath[SAVEFILENAMESIZE];
  54. X+ 
  55. X+ #else /* __MSDOS__ */
  56. X+ 
  57. X+ static char cmdhelp[] = "\
  58. X  Cmd line format: Ularn [-slicnh] [-o<optsfile>] [-##] [++]\n\
  59. X    -s   show the scoreboard\n\
  60. X    -i   show scoreboard with inventories\n\
  61. X***************
  62. X*** 28,35 ****
  63. X    -h   print this help text\n\
  64. X    -o<optsfile>   specify .Ularnopts file to be used instead of \"~/.Ularnopts\"\n\
  65. X    -##  specify level of difficulty (example: Ularn -5)\n\
  66. X!   -++  restore game checkpoint file\n";
  67. X  
  68. X  /*
  69. X      ************
  70. X      MAIN PROGRAM
  71. X--- 45,54 ----
  72. X    -h   print this help text\n\
  73. X    -o<optsfile>   specify .Ularnopts file to be used instead of \"~/.Ularnopts\"\n\
  74. X    -##  specify level of difficulty (example: Ularn -5)\n\
  75. X!   ++  restore game checkpoint file\n";
  76. X  
  77. X+ #endif  /* __MSDOS__ */
  78. X+ 
  79. X  /*
  80. X      ************
  81. X      MAIN PROGRAM
  82. X***************
  83. X*** 42,55 ****
  84. X  {
  85. X      register int i;
  86. X      int hard;
  87. X      char *ptr=0;
  88. X      struct passwd *pwe,*getpwuid();
  89. X  
  90. X-     init_term();    /*setup the terminal (find out what type) for termcap */
  91. X- 
  92. X  /*
  93. X   *    first task is to identify the player
  94. X   */
  95. X          if ((ptr = getlogin()) == NULL)
  96. X            if (pwe=getpwuid(geteuid()))
  97. X              ptr = pwe->pw_name;
  98. X--- 61,77 ----
  99. X  {
  100. X      register int i;
  101. X      int hard;
  102. X+ #ifdef __MSDOS__
  103. X+     char *p;
  104. X+ #else
  105. X      char *ptr=0;
  106. X      struct passwd *pwe,*getpwuid();
  107. X+ #endif
  108. X  
  109. X  /*
  110. X   *    first task is to identify the player
  111. X   */
  112. X+ #ifndef __MSDOS__
  113. X          if ((ptr = getlogin()) == NULL)
  114. X            if (pwe=getpwuid(geteuid()))
  115. X              ptr = pwe->pw_name;
  116. X***************
  117. X*** 60,68 ****
  118. X--- 82,201 ----
  119. X           }
  120. X      if (ptr==NULL) goto noone;
  121. X      if (strlen(ptr)==0) goto noone;
  122. X+ #endif /* __MSDOS__ */
  123. X+ 
  124. X  /*
  125. X+  * allocate the memory for the I/O routines
  126. X+  */
  127. X+ 
  128. X+     if ( ( lpbuf = malloc ((5* BUFBIG)>>2) ) == (char *)NULL)
  129. X+         died(-285);
  130. X+ 
  131. X+     if ( ( inbuffer = malloc( (5*MAXIBUF) >>2) ) == (char *)NULL)
  132. X+         died(-285);
  133. X+ 
  134. X+ /*
  135. X   *    second task is to prepare the pathnames the player will need
  136. X   */
  137. X+ 
  138. X+ #ifdef __MSDOS__
  139. X+ 
  140. X+ /*
  141. X+  * try to figure out where our data files are...
  142. X+  *
  143. X+  *  first try to find the path where ularn.exe resides.
  144. X+  */
  145. X+ 
  146. X+     logname[0] = loginname[0] = '\0';
  147. X+ 
  148. X+     if (strlen(argv[0])+1 > sizeof(larnpath)-12)
  149. X+         argv[0][sizeof(larnpath)-1] = '\0';
  150. X+     strcpy(larnpath, argv[0]);
  151. X+ 
  152. X+     p = larnpath + strlen(larnpath);
  153. X+     while (--p >= larnpath)
  154. X+         if (*p == '/' || *p == '\\' || *p == ':') break;
  155. X+     *(p + 1) = '\0';
  156. X+ 
  157. X+ /*
  158. X+  * if an option file name was specified on the command line, try to open it.
  159. X+  */
  160. X+ 
  161. X+     for (i=1; i<argc; i++)
  162. X+         if (argv[i][0] == '-' && argv[i][1] == 'o') {
  163. X+             strncpy(optsfile, argv[i]+2, SAVEFILENAMESIZE-1);
  164. X+             if (readopts() < 0) {
  165. X+                 fprintf(stderr, "Can't open options file %s\n.", optsfile);
  166. X+                 exit(1);
  167. X+             }
  168. X+             goto gotopts;
  169. X+         }
  170. X+ 
  171. X+ /* now look for an option file in the current directory */
  172. X+ 
  173. X+     strcpy(optsfile, "ularnopt");
  174. X+     if (readopts() < 0) {
  175. X+ 
  176. X+ /* then look for it in the larn exe directory */
  177. X+ 
  178. X+         strcpy(optsfile, larnpath);
  179. X+         strcat(optsfile, "ularnopt");
  180. X+         readopts();
  181. X+   }
  182. X+ 
  183. X+ gotopts:
  184. X+ 
  185. X+ /*
  186. X+  * if the player game a name on the command line, let it override one
  187. X+  *  given in the options file
  188. X+  */
  189. X+ 
  190. X+     if (argc > 1 && argv[argc-1][0] != '-' && argv[argc-1][0] != '+') {
  191. X+         --argc;
  192. X+         strcpy(logname, argv[argc]);
  193. X+     }
  194. X+ 
  195. X+ /* if the player didn't specify a name, ask now */
  196. X+ 
  197. X+     while (logname[0] == '\0') {
  198. X+         char tmp[LOGNAMESIZE];
  199. X+         printf("Who are you: ");
  200. X+         fgets(tmp, sizeof(tmp), stdin);
  201. X+         p = tmp + strlen(tmp);
  202. X+         while (--p >= tmp)
  203. X+             if (*p == '\n' || isspace(*p)) *p = '\0';
  204. X+             else break;
  205. X+         for (p=tmp; *p && isspace(*p); p++)
  206. X+             ;
  207. X+         strcpy(logname, p);
  208. X+     }
  209. X+ 
  210. X+ /*
  211. X+  * if the save file name wasn't specified in the options file, use the player's
  212. X+  *  name in the current directory.
  213. X+  */
  214. X+ 
  215. X+     if (savefilename[0] == '\0') {
  216. X+         strcpy(savefilename, logname);
  217. X+         savefilename[8] = '\0';
  218. X+         for (p=savefilename; *p; p++)
  219. X+             if (isspace(*p) || *p == '.' || *p == '\\' || *p == '/') {
  220. X+                 *p = '\0';
  221. X+                 break;
  222. X+             }
  223. X+         strcat(savefilename, ".sav");
  224. X+     }
  225. X+ 
  226. X+ /* set the paths for the data files */
  227. X+ 
  228. X+     strcpy(scorefile,  larnpath);
  229. X+     strcpy(logfile,    larnpath);
  230. X+     strcpy(helpfile,   larnpath);
  231. X+     strcpy(larnlevels, larnpath);
  232. X+     strcpy(fortfile,   larnpath);
  233. X+ 
  234. X+ #else /* __MSDOS__ */
  235. X+ 
  236. X      strcpy(loginname,ptr); 
  237. X  
  238. X      /* save loginname of the user for logging purposes */
  239. X***************
  240. X*** 76,83 ****
  241. X      /* save file name in home directory */
  242. X      strcpy(savefilename, ptr);
  243. X      strcat(savefilename, "/Ularn.sav");    
  244. X- 
  245. X      sprintf(optsfile, "%s/.Ularnopts",ptr);    /* the .Ularnopts filename */
  246. X      strcat(scorefile, SCORENAME);    /* the Ularn scoreboard filename */
  247. X      strcat(logfile, LOGFNAME);
  248. X  
  249. X--- 209,218 ----
  250. X      /* save file name in home directory */
  251. X      strcpy(savefilename, ptr);
  252. X      strcat(savefilename, "/Ularn.sav");    
  253. X      sprintf(optsfile, "%s/.Ularnopts",ptr);    /* the .Ularnopts filename */
  254. X+ 
  255. X+ #endif  /* __MSDOS__ */
  256. X+ 
  257. X      strcat(scorefile, SCORENAME);    /* the Ularn scoreboard filename */
  258. X      strcat(logfile, LOGFNAME);
  259. X  
  260. X***************
  261. X*** 85,104 ****
  262. X      strcat(helpfile, HELPNAME);    /* the Ularn on-line help file */
  263. X      strcat(larnlevels, LEVELSNAME);    /* the pre-made cave level data file */
  264. X      strcat(fortfile, FORTSNAME);    /* the fortune data file name */
  265. X  /*
  266. X   *    now malloc the memory for the dungeon 
  267. X   */
  268. X- cell = (struct cel *)malloc(sizeof(struct cel)*(MAXLEVEL+MAXVLEVEL)*MAXX*MAXY);
  269. X  
  270. X!     if (cell == (struct cel *)NULL) 
  271. X!         died(-285);    /* malloc failure */
  272. X  
  273. X-     if ( ( lpbuf = malloc ((5* BUFBIG)>>2) ) == (char *)NULL)
  274. X-         died(-285);
  275. X- 
  276. X-     if ( ( inbuffer = malloc( (5*MAXIBUF) >>2) ) == (char *)NULL)
  277. X-         died(-285);
  278. X- 
  279. X      lcreat((char*)0);    
  280. X      newgame();        /*    set the initial clock  */ 
  281. X      hard= -1;
  282. X--- 220,235 ----
  283. X      strcat(helpfile, HELPNAME);    /* the Ularn on-line help file */
  284. X      strcat(larnlevels, LEVELSNAME);    /* the pre-made cave level data file */
  285. X      strcat(fortfile, FORTSNAME);    /* the fortune data file name */
  286. X+ 
  287. X+ 
  288. X+     init_term();    /*setup the terminal (find out what type) for termcap */
  289. X+ 
  290. X  /*
  291. X   *    now malloc the memory for the dungeon 
  292. X   */
  293. X  
  294. X!         init_cells();
  295. X  
  296. X      lcreat((char*)0);    
  297. X      newgame();        /*    set the initial clock  */ 
  298. X      hard= -1;
  299. X***************
  300. X*** 112,117 ****
  301. X--- 243,249 ----
  302. X  /*
  303. X   *    now process the command line arguments 
  304. X   */
  305. X+ 
  306. X      for (i=1; i<argc; i++) {
  307. X          if (argv[i][0] == '-')
  308. X            switch(argv[i][1]) {
  309. X***************
  310. X*** 165,176 ****
  311. X      }
  312. X  
  313. X  
  314. X      userid = geteuid();    /* obtain the user's effective id number */
  315. X  
  316. X      sigsetup();    /* trap all needed signals    */
  317. X      sethard(hard);    /* set up the desired difficulty    */
  318. X!     setupvt100();    /* setup the terminal special mode    */
  319. X      readopts();    /* read the options file if there is one */
  320. X  
  321. X      /* restore game if need to */
  322. X      if (access(savefilename,0)==0)    {
  323. X--- 297,314 ----
  324. X      }
  325. X  
  326. X  
  327. X+ #ifndef __MSDOS__
  328. X      userid = geteuid();    /* obtain the user's effective id number */
  329. X+ #else
  330. X+         userid = 42;
  331. X+ #endif
  332. X  
  333. X      sigsetup();    /* trap all needed signals    */
  334. X      sethard(hard);    /* set up the desired difficulty    */
  335. X! #ifndef __MSDOS__  /* if __MSDOS__, we've already done this */
  336. X      readopts();    /* read the options file if there is one */
  337. X+ #endif
  338. X+     setupvt100();    /* setup the terminal special mode    */
  339. X  
  340. X      /* restore game if need to */
  341. X      if (access(savefilename,0)==0)    {
  342. X***************
  343. X*** 321,327 ****
  344. X  
  345. X      /* count number of items we will display */
  346. X      for (count=2,j=0; j<26; j++)     
  347. X!        if (i=iven[j])
  348. X          switch(i) {
  349. X              case OLEATHER:    
  350. X              case OPLATE:    
  351. X--- 459,465 ----
  352. X  
  353. X      /* count number of items we will display */
  354. X      for (count=2,j=0; j<26; j++)     
  355. X!        if ((i=iven[j])!=0)
  356. X          switch(i) {
  357. X              case OLEATHER:    
  358. X              case OPLATE:    
  359. X***************
  360. X*** 369,375 ****
  361. X      srcount=0;
  362. X  
  363. X       for (count=2,j=0; j<26; j++)    /* count how many items */
  364. X!        if (i=iven[j])
  365. X          switch(i) {
  366. X              case ODIAMOND:  case ORUBY:  case OEMERALD:  
  367. X              case OSAPPHIRE:
  368. X--- 507,513 ----
  369. X      srcount=0;
  370. X  
  371. X       for (count=2,j=0; j<26; j++)    /* count how many items */
  372. X!        if ((i=iven[j])!=0)
  373. X          switch(i) {
  374. X              case ODIAMOND:  case ORUBY:  case OEMERALD:  
  375. X              case OSAPPHIRE:
  376. X***************
  377. X*** 1018,1034 ****
  378. X                  else if (amt<=327670L) { 
  379. X                      *p=ODGOLD; 
  380. X                      i=amt/10; 
  381. X!                     amt = 10*i; 
  382. X                  }
  383. X                  else if (amt<=3276700L) { 
  384. X                      *p=OMAXGOLD; 
  385. X                      i=amt/100; 
  386. X!                     amt = 100*i; 
  387. X                  }
  388. X                  else if (amt<=32767000L) { 
  389. X                      *p=OKGOLD; 
  390. X                      i=amt/1000; 
  391. X!                     amt = 1000*i; 
  392. X                  }
  393. X                  else { 
  394. X                      *p=OKGOLD; 
  395. X--- 1156,1172 ----
  396. X                  else if (amt<=327670L) { 
  397. X                      *p=ODGOLD; 
  398. X                      i=amt/10; 
  399. X!                     amt = 10L*i; 
  400. X                  }
  401. X                  else if (amt<=3276700L) { 
  402. X                      *p=OMAXGOLD; 
  403. X                      i=amt/100; 
  404. X!                     amt = 100L*i; 
  405. X                  }
  406. X                  else if (amt<=32767000L) { 
  407. X                      *p=OKGOLD; 
  408. X                      i=amt/1000; 
  409. X!                     amt = 1000L*i; 
  410. X                  }
  411. X                  else { 
  412. X                      *p=OKGOLD; 
  413. X***************
  414. X*** 1085,1091 ****
  415. X                  lprcat("\nThe cookie was delicious.");
  416. X                  iven[i-'a']=0;
  417. X                  if (!c[BLINDCOUNT]) {
  418. X!                     if (p=fortune(fortfile)) {
  419. X                          lprcat("  Inside you find a scrap of paper that says:\n");
  420. X                          lprcat(p);
  421. X                          }
  422. X--- 1223,1229 ----
  423. X                  lprcat("\nThe cookie was delicious.");
  424. X                  iven[i-'a']=0;
  425. X                  if (!c[BLINDCOUNT]) {
  426. X!                     if ((p=fortune(fortfile))!=0) {
  427. X                          lprcat("  Inside you find a scrap of paper that says:\n");
  428. X                          lprcat(p);
  429. X                          }
  430. Xdiff -c orig/makehelp.bat new/makehelp.bat
  431. X*** orig/makehelp.bat    Sun Jul 16 05:19:23 1989
  432. X--- new/makehelp.bat    Sun Jul 16 04:59:03 1989
  433. X***************
  434. X*** 0 ****
  435. X--- 1 ----
  436. X+ to_ansi <uhelp.no_ >uhelp
  437. Xdiff -c orig/monster.c new/monster.c
  438. X*** orig/monster.c    Sun Jul 16 01:00:30 1989
  439. X--- new/monster.c    Sun Jul 16 04:57:39 1989
  440. X***************
  441. X*** 216,238 ****
  442. X                      return;
  443. X                  }
  444. X              case ODGOLD :
  445. X!                 if ( (10 * iarg[x][y] + arg) < 327670L) {
  446. X                      i = iarg[x][y] ;
  447. X!                     iarg[x][y] = (10 * i + arg) / 10;
  448. X                      item[x][y] = ODGOLD;
  449. X                      return;
  450. X                  }
  451. X              case OMAXGOLD :
  452. X!                 if ( (100 * iarg[x][y] + arg) < 3276700L) {
  453. X!                     i = (100 * iarg[x][y]) + arg;
  454. X!                     iarg[x][y] = i / 100;
  455. X                      item[x][y] = OMAXGOLD;
  456. X                      return;
  457. X                  }
  458. X              case OKGOLD :
  459. X!                 if ( (1000 * iarg[x][y] + arg) < 32767000L) { 
  460. X                      i = iarg[x][y];
  461. X!                     iarg[x][y] = (1000 * i + arg) / 1000;
  462. X                      item[x][y] = OKGOLD;
  463. X                      return;
  464. X                  }
  465. X--- 216,238 ----
  466. X                      return;
  467. X                  }
  468. X              case ODGOLD :
  469. X!                 if ( (10L * iarg[x][y] + arg) < 327670L) {
  470. X                      i = iarg[x][y] ;
  471. X!                     iarg[x][y] = (10L * i + arg) / 10;
  472. X                      item[x][y] = ODGOLD;
  473. X                      return;
  474. X                  }
  475. X              case OMAXGOLD :
  476. X!                 if ( (100L * iarg[x][y] + arg) < 3276700L) {
  477. X!                     i = ((100L * iarg[x][y]) + arg)/100;
  478. X!                     iarg[x][y] = i;
  479. X                      item[x][y] = OMAXGOLD;
  480. X                      return;
  481. X                  }
  482. X              case OKGOLD :
  483. X!                 if ( (1000L * iarg[x][y] + arg) < 32767000L) { 
  484. X                      i = iarg[x][y];
  485. X!                     iarg[x][y] = (1000L * i + arg) / 1000;
  486. X                      item[x][y] = OKGOLD;
  487. X                      return;
  488. X                  }
  489. X***************
  490. X*** 401,406 ****
  491. X--- 401,413 ----
  492. X          return;    /* cure blindness    */
  493. X  
  494. X      case 11:    
  495. X+         if (wizard) {
  496. X+             lprintf("Number: ");
  497. X+             if ((i = readnum((long)-1)) != -1) {
  498. X+                 createmonster(i);
  499. X+                 return;
  500. X+             }
  501. X+         }
  502. X          createmonster(makemonst(level+1)+8);  
  503. X          return;
  504. X  
  505. X***************
  506. X*** 885,891 ****
  507. X              nap(delay); 
  508. X              show1cell(x,y);
  509. X          }
  510. X!         if ((m=mitem[x][y]))    /* is there a monster there? */
  511. X          {
  512. X              ifblind(x,y);
  513. X              if (m == LUCIFER || (m>=DEMONLORD && rnd(100)<10) ) {
  514. X--- 892,898 ----
  515. X              nap(delay); 
  516. X              show1cell(x,y);
  517. X          }
  518. X!         if ((m=mitem[x][y])!=0)    /* is there a monster there? */
  519. X          {
  520. X              ifblind(x,y);
  521. X              if (m == LUCIFER || (m>=DEMONLORD && rnd(100)<10) ) {
  522. X***************
  523. X*** 1081,1087 ****
  524. X      for (x=playerx-1; x<playerx+2; x++)
  525. X          for (y=playery-1; y<playery+2; y++)
  526. X          {
  527. X!             if (m=mitem[x][y])
  528. X                  if (nospell(spnum,m) == 0)
  529. X                  {
  530. X                      ifblind(x,y);
  531. X--- 1088,1094 ----
  532. X      for (x=playerx-1; x<playerx+2; x++)
  533. X          for (y=playery-1; y<playery+2; y++)
  534. X          {
  535. X!             if ((m=mitem[x][y])!=0)
  536. X                  if (nospell(spnum,m) == 0)
  537. X                  {
  538. X                      ifblind(x,y);
  539. X***************
  540. X*** 1227,1233 ****
  541. X      hit3flag=1;  
  542. X      ifblind(x,y);
  543. X  
  544. X! tmp = monster[monst].armorclass + c[LEVEL] + c[DEXTERITY] + c[WCLASS/4] -12 
  545. X          - c[HARDGAME];
  546. X  
  547. X      cursors();
  548. X--- 1234,1242 ----
  549. X      hit3flag=1;  
  550. X      ifblind(x,y);
  551. X  
  552. X! /* this couldn't have been right, could it? */
  553. X! /*tmp = monster[monst].armorclass + c[LEVEL] + c[DEXTERITY] + c[WCLASS/4] -12*/
  554. X! tmp = monster[monst].armorclass + c[LEVEL] + c[DEXTERITY] + c[WCLASS]/4 -12
  555. X          - c[HARDGAME];
  556. X  
  557. X      cursors();
  558. X***************
  559. X*** 1487,1494 ****
  560. X  dropgold(amount)
  561. X  register int amount;
  562. X  {
  563. X!     if (amount > 250) createitem(OMAXGOLD, amount);  
  564. X!     else  createitem(OGOLDPILE,amount);
  565. X  }
  566. X  
  567. X  /*
  568. X--- 1496,1503 ----
  569. X  dropgold(amount)
  570. X  register int amount;
  571. X  {
  572. X!     if (amount > 250) createitem(OMAXGOLD, (long)amount);  
  573. X!     else  createitem(OGOLDPILE,(long)amount);
  574. X  }
  575. X  
  576. X  /*
  577. X***************
  578. X*** 1510,1516 ****
  579. X      if (rnd(101)<8) 
  580. X          something(lev); /* possibly more than one item */
  581. X      j = newobject(lev,&i);        
  582. X!     createitem(j,i);
  583. X  }
  584. X  
  585. X  /*
  586. X--- 1519,1525 ----
  587. X      if (rnd(101)<8) 
  588. X          something(lev); /* possibly more than one item */
  589. X      j = newobject(lev,&i);        
  590. X!     createitem(j,(long)i);
  591. X  }
  592. X  
  593. X  /*
  594. X***************
  595. X*** 1570,1581 ****
  596. X      case 17: 
  597. X      case 18: 
  598. X      case 19: 
  599. X!         if (!(*i=newdagger()))  return(0);  
  600. X          break;
  601. X      case 20: 
  602. X      case 21: 
  603. X      case 22: 
  604. X!         if (!(*i=newleather()))  return(0);  
  605. X          break;
  606. X      case 23: 
  607. X      case 32: 
  608. X--- 1579,1590 ----
  609. X      case 17: 
  610. X      case 18: 
  611. X      case 19: 
  612. X!         if ((*i=newdagger())==0)  return(0);  
  613. X          break;
  614. X      case 20: 
  615. X      case 21: 
  616. X      case 22: 
  617. X!         if ((*i=newleather())==0)  return(0);  
  618. X          break;
  619. X      case 23: 
  620. X      case 32: 
  621. X***************
  622. X*** 1694,1703 ****
  623. X      switch(x) {
  624. X      case 1:    /* rust your armor, j=1 when rusting has occurred */
  625. X          m = k = c[WEAR];
  626. X!         if ((i=c[SHIELD]) != -1)
  627. X!             if (--ivenarg[i] < -1) 
  628. X                  ivenarg[i]= -1; 
  629. X              else j=1;
  630. X          if ((j==0) && (k != -1)) {
  631. X              m = iven[k];
  632. X              for (i=0; i<ARMORTYPES; i++)
  633. X--- 1703,1714 ----
  634. X      switch(x) {
  635. X      case 1:    /* rust your armor, j=1 when rusting has occurred */
  636. X          m = k = c[WEAR];
  637. X!         if ((i=c[SHIELD]) != -1) {
  638. X!             --ivenarg[i];  /* avoid TC bug again... */
  639. X!             if (ivenarg[i] < -1) 
  640. X                  ivenarg[i]= -1; 
  641. X              else j=1;
  642. X+         }
  643. X          if ((j==0) && (k != -1)) {
  644. X              m = iven[k];
  645. X              for (i=0; i<ARMORTYPES; i++)
  646. X***************
  647. X*** 1704,1710 ****
  648. X                  if (m == rustarm[i][0]) 
  649. X                      /* find his armor in table */
  650. X                  {
  651. X!                     if (--ivenarg[k]< rustarm[i][1])
  652. X                          ivenarg[k]= rustarm[i][1]; 
  653. X                      else j=1; 
  654. X                      break;
  655. X--- 1715,1722 ----
  656. X                  if (m == rustarm[i][0]) 
  657. X                      /* find his armor in table */
  658. X                  {
  659. X!                     --ivenarg[k];
  660. X!                     if (ivenarg[k]< rustarm[i][1])
  661. X                          ivenarg[k]= rustarm[i][1]; 
  662. X                      else j=1; 
  663. X                      break;
  664. Xdiff -c orig/nap.c new/nap.c
  665. X*** orig/nap.c    Sun Jul 16 01:07:09 1989
  666. X--- new/nap.c    Sun Jul 16 04:37:49 1989
  667. X***************
  668. X*** 2,7 ****
  669. X--- 2,11 ----
  670. X  
  671. X  #include "header.h"
  672. X  
  673. X+ #ifdef __MSDOS__
  674. X+ # include <dos.h>
  675. X+ #endif
  676. X+ 
  677. X  /*
  678. X   *    routine to take a nap for n milliseconds
  679. X   */
  680. X***************
  681. X*** 96,105 ****
  682. X      }
  683. X  }
  684. X  #    endif /* SIGVTALARAM */
  685. X! #  else /* not BSD */
  686. X  napms(time) 
  687. X  int time; 
  688. X  {
  689. X  }    /* do nothing, forget it */
  690. X  #  endif /* BSD */
  691. X  #endif /* SYSV */
  692. X--- 100,139 ----
  693. X      }
  694. X  }
  695. X  #    endif /* SIGVTALARAM */
  696. X! #  else
  697. X! #   ifdef __MSDOS__
  698. X! 
  699. X! napms(zzz)
  700. X! int zzz;
  701. X! {
  702. X!   time_t targ_time, t;
  703. X!   int targ_hund;
  704. X!   struct time tm;
  705. X! 
  706. X!   time(&targ_time);
  707. X!   gettime(&tm);
  708. X!   targ_hund = tm.ti_hund + zzz/10;
  709. X! 
  710. X!   while (targ_hund >= 100) {
  711. X!     targ_hund -= 100;
  712. X!     ++targ_time;
  713. X!   }
  714. X! 
  715. X!   do {
  716. X!     time(&t);
  717. X!   } while (t < targ_time);
  718. X! 
  719. X!   do {
  720. X!     gettime(&tm);
  721. X!   } while (tm.ti_hund < targ_hund);
  722. X! }
  723. X! 
  724. X! #   else
  725. X! 
  726. X  napms(time) 
  727. X  int time; 
  728. X  {
  729. X  }    /* do nothing, forget it */
  730. X+ #   endif /* __MSDOS__ */
  731. X  #  endif /* BSD */
  732. X  #endif /* SYSV */
  733. Xdiff -c orig/object.c new/object.c
  734. X*** orig/object.c    Sun Jul 16 01:00:05 1989
  735. X--- new/object.c    Sun Jul 16 04:53:56 1989
  736. X***************
  737. X*** 1131,1138 ****
  738. X  {
  739. X      register int j;
  740. X      for (j=0; j<26; j++)    /* adjust time related parameters */
  741. X!         if (c[time_change[j]])
  742. X!             if ((c[time_change[j]] -= tim) < 1) c[time_change[j]]=1;
  743. X      regen();
  744. X  }
  745. X  
  746. X--- 1131,1144 ----
  747. X  {
  748. X      register int j;
  749. X      for (j=0; j<26; j++)    /* adjust time related parameters */
  750. X!         if (c[time_change[j]]) {
  751. X! /* this next line rearranged to avoid TC bug */
  752. X! /*            if ((c[time_change[j]] -= tim) < 1) c[time_change[j]]=1;*/
  753. X!                         if (c[time_change[j]] < tim+1)
  754. X!                           c[time_change[j]] = 1;
  755. X!                         else
  756. X!                           c[time_change[j]] -= tim;
  757. X!                 }
  758. X      regen();
  759. X  }
  760. X  
  761. X***************
  762. X*** 1404,1414 ****
  763. X      register int i,tmp;
  764. X  
  765. X      if (arg<=3) 
  766. X!         i = rund((tmp=splev[arg])?tmp:1); 
  767. X      else {
  768. X          if (arg >= 21) 
  769. X              arg = 20;    /* # entries in splev = 21 */
  770. X!         i = rnd( (tmp=splev[arg]-9) ?tmp:1 ) + 9;
  771. X      }
  772. X      spelknow[i]=1;
  773. X      lprintf("\nSpell \"%s\":  %s\n%s",
  774. X--- 1410,1420 ----
  775. X      register int i,tmp;
  776. X  
  777. X      if (arg<=3) 
  778. X!         i = rund(((tmp=splev[arg])!=0)?tmp:1); 
  779. X      else {
  780. X          if (arg >= 21) 
  781. X              arg = 20;    /* # entries in splev = 21 */
  782. X!         i = rnd( ((tmp=splev[arg]-9)!=0) ?tmp:1 ) + 9;
  783. X      }
  784. X      spelknow[i]=1;
  785. X      lprintf("\nSpell \"%s\":  %s\n%s",
  786. X***************
  787. X*** 1436,1442 ****
  788. X              lprcat("eat\nThe cookie tasted good.");
  789. X              forget(); /* no more cookie    */
  790. X              if (c[BLINDCOUNT]) return;
  791. X!             if (!(p=fortune(fortfile))) return;
  792. X              lprcat("  A message inside the cookie reads:\n"); 
  793. X              lprcat(p);
  794. X              return;
  795. X--- 1442,1448 ----
  796. X              lprcat("eat\nThe cookie tasted good.");
  797. X              forget(); /* no more cookie    */
  798. X              if (c[BLINDCOUNT]) return;
  799. X!             if ((p=fortune(fortfile)) == NULL) return;
  800. X              lprcat("  A message inside the cookie reads:\n"); 
  801. X              lprcat(p);
  802. X              return;
  803. Xdiff -c orig/patchlevel.h new/patchlevel.h
  804. X*** orig/patchlevel.h    Sun Jul 16 01:07:17 1989
  805. X--- new/patchlevel.h    Sun Jul 16 04:58:57 1989
  806. X***************
  807. X*** 1 ****
  808. X! #define PATCHLEVEL    1
  809. X--- 1 ----
  810. X! #define PATCHLEVEL 2
  811. Xdiff -c orig/regen.c new/regen.c
  812. X*** orig/regen.c    Sun Jul 16 01:02:38 1989
  813. X--- new/regen.c    Sun Jul 16 04:57:57 1989
  814. X***************
  815. X*** 143,149 ****
  816. X              }
  817. X          if (i!=999)
  818. X              if (--d[SEEINVISIBLE]<=0) {
  819. X!                 monstnamelist[INVISIBLESTALKER] = ' ';
  820. X                  cursors();  
  821. X                 lprcat("\nYou feel your vision return to normal"); 
  822. X                  beep(); 
  823. X--- 143,150 ----
  824. X              }
  825. X          if (i!=999)
  826. X              if (--d[SEEINVISIBLE]<=0) {
  827. X!                 monstnamelist[INVISIBLESTALKER] =
  828. X!                     objnamelist[0];
  829. X                  cursors();  
  830. X                 lprcat("\nYou feel your vision return to normal"); 
  831. X                  beep(); 
  832. Xdiff -c orig/savelev.c new/savelev.c
  833. X*** orig/savelev.c    Sun Jul 16 01:03:14 1989
  834. X--- new/savelev.c    Sun Jul 16 06:14:05 1989
  835. X***************
  836. X*** 1,62 ****
  837. X  /* savelev.c    */
  838. X  #include "header.h"
  839. X  
  840. X! extern struct cel *cell;
  841. X  
  842. X  /*
  843. X!  *    routine to save the present level into storage
  844. X   */
  845. X! savelevel()
  846. X  {
  847. X!     struct cel *pcel;
  848. X!     char *pitem,*pknow,*pmitem;
  849. X!     short *phitp,*piarg;
  850. X!     struct cel *pecel;
  851. X  
  852. X!     pcel = &cell[level*MAXX*MAXY];    /* pointer to this level's cells */
  853. X  
  854. X!     /* pointer to past end of this level's cells */
  855. X!     pecel = pcel + MAXX*MAXY;    
  856. X  
  857. X!     pitem=item[0]; 
  858. X!     piarg=iarg[0]; 
  859. X!     pknow=know[0]; 
  860. X!     pmitem=mitem[0]; 
  861. X!     phitp=hitp[0];
  862. X!     while (pcel < pecel) {
  863. X!         pcel->mitem  = *pmitem++;
  864. X!         pcel->hitp   = *phitp++;
  865. X!         pcel->item   = *pitem++;
  866. X!         pcel->know   = *pknow++;
  867. X!         pcel++->iarg = *piarg++;
  868. X!     }
  869. X  }
  870. X  
  871. X  /*
  872. X   *    routine to restore a level from storage
  873. X   */
  874. X  getlevel()
  875. X  {
  876. X!     struct cel *pcel;
  877. X!     char *pitem,*pknow,*pmitem;
  878. X!     short *phitp,*piarg;
  879. X!     struct cel *pecel;
  880. X  
  881. X!     pcel = &cell[level*MAXX*MAXY];    /* pointer to this level's cells */
  882. X  
  883. X!     /* pointer to past end of this level's cells */
  884. X!     pecel = pcel + MAXX*MAXY;    
  885. X  
  886. X!     pitem=item[0]; 
  887. X!     piarg=iarg[0]; 
  888. X!     pknow=know[0]; 
  889. X!     pmitem=mitem[0]; 
  890. X!     phitp=hitp[0];
  891. X!     while (pcel < pecel) {
  892. X!         *pmitem++ = pcel->mitem;
  893. X!         *phitp++ = pcel->hitp;
  894. X!         *pitem++ = pcel->item;
  895. X!         *pknow++ = pcel->know;
  896. X!         *piarg++ = pcel++->iarg;
  897. X      }
  898. X  }
  899. X--- 1,626 ----
  900. X  /* savelev.c    */
  901. X  #include "header.h"
  902. X  
  903. X! #ifdef __MSDOS__
  904. X  
  905. X+ # define SWAPPING
  906. X+ 
  907. X+ extern unsigned long coreleft(void);
  908. X+ 
  909. X  /*
  910. X!  * how much memory must we leave after allocating space for all the
  911. X!  *  levels? we need memory for the fortune file and for spheres.
  912. X   */
  913. X! 
  914. X! # define LEFTOVERS 20000
  915. X! 
  916. X! #endif
  917. X! 
  918. X! /*
  919. X!  * When a player leaves a level, the arrays describing that level are
  920. X!  *  concatenated and placed in a Saved_Level structure. Memory space for
  921. X!  *  these structures is pointed to by saved_levels[]. For each entry in
  922. X!  *  saved_levels[], the corresponding entry in slot_in_use[] is 1 if
  923. X!  *  that entry is currently holding a level, -1 if that level couldn't
  924. X!  *  be malloc'd, and 0 if it is free. For each level, its entry in
  925. X!  *  level_locs[] is the index into saved_levels[] where it is stored, or
  926. X!  *  -1 if it isn't stored there (it is the current level, or it hasn't
  927. X!  *  been visited yet). If the level is stored in the swapfile, level_loc
  928. X!  *  is (-2 - swap_slot). slot_time holds the time when the level
  929. X!  *  in that slot was saved, for implementing LRU swapping. An entry in
  930. X!  *  swap_slot_in_use is 1 if the slot is in use, 0 if it is free, and -1 if
  931. X!  *  it hasn't been allocated yet. If swap_slot_in_use[0] == -1, the swapfile
  932. X!  *  hasn't been opened yet.
  933. X!  */
  934. X! 
  935. X! typedef char Char_Ary[MAXX][MAXY];
  936. X! typedef short Short_Ary[MAXX][MAXY];
  937. X! 
  938. X! /* this is the structure that holds the entire dungeon specifications */
  939. X! typedef struct {
  940. X!   Short_Ary hitp;
  941. X!   Char_Ary  mitem;
  942. X!   Char_Ary  item;
  943. X!   Short_Ary iarg;
  944. X!   Char_Ary  know;
  945. X! } Saved_Level;
  946. X! 
  947. X! #define NLEVELS (MAXLEVEL + MAXVLEVEL)
  948. X! 
  949. X! static Saved_Level *saved_levels[NLEVELS];
  950. X! 
  951. X! #ifdef SWAPPING
  952. X! 
  953. X! static int slot_in_use[NLEVELS], level_locs[NLEVELS];
  954. X! static long slot_time[NLEVELS];
  955. X! static int swap_slot_in_use[NLEVELS];
  956. X! static char swap_file_name[] = "lrnswpxxxxxx";
  957. X! static FILE *swap_fp = NULL;
  958. X! 
  959. X! /*
  960. X!  * open and close the swap file...
  961. X!  */
  962. X! 
  963. X! close_swap_file()
  964. X  {
  965. X!   fclose(swap_fp);
  966. X!   unlink(swap_file_name);
  967. X! }
  968. X  
  969. X! open_swap_file()
  970. X! {
  971. X!   mktemp(swap_file_name);
  972. X!   if ((swap_fp = fopen(swap_file_name, "w+b")) == NULL) {
  973. X!     perror("Can't open swap file");
  974. X!     abort();
  975. X!   }
  976. X!   lprintf("(Opened swap file)\n");
  977. X  
  978. X!   atexit(close_swap_file);
  979. X! }
  980. X  
  981. X! #define SWAP_SEEK(slot) fseek(swap_fp, (long)(slot)*sizeof(Saved_Level), 0)
  982. X! 
  983. X! /*
  984. X!  * swap_write: write a level out to the swap file
  985. X!  */
  986. X! 
  987. X! swap_write(storage, slot)
  988. X! Saved_Level *storage;
  989. X! int slot;
  990. X! {
  991. X!   if (swap_fp == NULL || slot < 0 || slot >= NLEVELS || storage == NULL) {
  992. X!     puts("swap_write: bogus arguments");
  993. X!     abort();
  994. X!   }
  995. X! 
  996. X!   if (SWAP_SEEK(slot) ||
  997. X!        fwrite((char *)storage, sizeof(Saved_Level), 1, swap_fp) != 1) {
  998. X!     perror("Can't write to swap file");
  999. X!     abort();
  1000. X!   }
  1001. X  }
  1002. X  
  1003. X  /*
  1004. X+  * swap_read: read a level in from the swap file
  1005. X+  */
  1006. X+ 
  1007. X+ swap_read(storage, slot)
  1008. X+ Saved_Level *storage;
  1009. X+ int slot;
  1010. X+ {
  1011. X+   if (swap_fp == NULL || slot < 0 || slot >= NLEVELS || storage == NULL) {
  1012. X+     puts("swap_read: bogus arguments");
  1013. X+     abort();
  1014. X+   }
  1015. X+ 
  1016. X+   if (SWAP_SEEK(slot) ||
  1017. X+        fread((char *)storage, sizeof(Saved_Level), 1, swap_fp) != 1) {
  1018. X+     perror("Can't read from swap file");
  1019. X+     abort();
  1020. X+   }
  1021. X+ }
  1022. X+ 
  1023. X+ /*
  1024. X+  * swap_out_level: swap the least-recently saved level out.
  1025. X+  */
  1026. X+ 
  1027. X+ swap_out_level()
  1028. X+ {
  1029. X+   int lru_slot = -1;
  1030. X+   long lru_time;
  1031. X+   int swap_slot = -1;
  1032. X+   int i, level;
  1033. X+ 
  1034. X+   time(&lru_time);
  1035. X+ 
  1036. X+   for (i=0; i<NLEVELS; i++)
  1037. X+     if (slot_in_use[i] == 1 && slot_time[i] < lru_time) {
  1038. X+       lru_time = slot_time[i];
  1039. X+       lru_slot = i;
  1040. X+     }
  1041. X+ 
  1042. X+   if (lru_slot == -1) {
  1043. X+     puts("swap_out_level: couldn't find a level to swap out!");
  1044. X+     abort();
  1045. X+   }
  1046. X+ 
  1047. X+   for (i=0; i<NLEVELS; i++)
  1048. X+     if (swap_slot_in_use[i] != 1) {
  1049. X+       if (swap_slot_in_use[i] == -1 && i == 0) open_swap_file();
  1050. X+       swap_slot = i;
  1051. X+       break;
  1052. X+     }
  1053. X+ 
  1054. X+   if (swap_slot == -1) {
  1055. X+     puts("swap_out_level: couldn't find a free swap slot!");
  1056. X+     abort();
  1057. X+   }
  1058. X+ 
  1059. X+   swap_write(saved_levels[lru_slot], swap_slot);
  1060. X+ 
  1061. X+   level=-1;
  1062. X+   for (i=0; i<NLEVELS; i++)
  1063. X+     if (level_locs[i] == lru_slot) {
  1064. X+       level = i;
  1065. X+       break;
  1066. X+     }
  1067. X+ 
  1068. X+   if (level == -1) {
  1069. X+     puts("swap_out_level: i couldn't figure out what level i was outswapping");
  1070. X+     abort();
  1071. X+   }
  1072. X+ 
  1073. X+   level_locs[level] = -2-swap_slot;
  1074. X+   slot_in_use[lru_slot] = 0;
  1075. X+   swap_slot_in_use[swap_slot] = 1;
  1076. X+ }
  1077. X+ 
  1078. X+ /*
  1079. X+  * alloc_level allocates a slot for a new level and returns a pointer to the
  1080. X+  *  Saved_Level structure. note: this pointer may be invalidated by any
  1081. X+  *  future calls to get_level or alloc_level.
  1082. X+  */
  1083. X+ 
  1084. X+ static Saved_Level *alloc_level(level)
  1085. X+ int level;
  1086. X+ {
  1087. X+   int i;
  1088. X+   int tried_to_swap = 0;
  1089. X+ 
  1090. X+ try_again:
  1091. X+   for (i=0; i<NLEVELS; i++)
  1092. X+     if (slot_in_use[i] == 0) {
  1093. X+       slot_in_use[i] = 1;
  1094. X+       level_locs[level] = i;
  1095. X+       time(&slot_time[i]);
  1096. X+       if (saved_levels[i] == NULL) {
  1097. X+         printf("bug in alloc_level!");
  1098. X+         abort();
  1099. X+       }
  1100. X+       return saved_levels[i];
  1101. X+     }
  1102. X+ 
  1103. X+   if (tried_to_swap) {
  1104. X+     puts("Can't find a place to put a level!");
  1105. X+     abort();
  1106. X+   }
  1107. X+   else {
  1108. X+     tried_to_swap = 1;
  1109. X+     swap_out_level();
  1110. X+     goto try_again;
  1111. X+   }
  1112. X+ }
  1113. X+ 
  1114. X+ /*
  1115. X+  * get_level returns a pointer to the Saved_Level structure for the indicated
  1116. X+  *  level. note: this pointer may be invalidated by any future calls to
  1117. X+  *  get_level or alloc_level.
  1118. X+  */
  1119. X+ 
  1120. X+ static Saved_Level *get_level(level)
  1121. X+ int level;
  1122. X+ {
  1123. X+   int slot = level_locs[level];
  1124. X+   Saved_Level *storage = saved_levels[slot];
  1125. X+ 
  1126. X+   if (slot == -1 || slot >= NLEVELS || slot <= -2 - NLEVELS) {
  1127. X+     puts("bug in get_level!");
  1128. X+     abort();
  1129. X+   }
  1130. X+ 
  1131. X+   if (slot >= 0)
  1132. X+     storage = saved_levels[slot];
  1133. X+   else {
  1134. X+ 
  1135. X+ /* swap in the level */
  1136. X+ 
  1137. X+     slot = -2 - slot;
  1138. X+     if (swap_slot_in_use[slot] != 1) {
  1139. X+       puts("bogus swapped level_loc in get_level!");
  1140. X+       abort();
  1141. X+     }
  1142. X+     storage = alloc_level(level);
  1143. X+ 
  1144. X+     swap_read(storage, slot);
  1145. X+ 
  1146. X+     swap_slot_in_use[slot] = 0;
  1147. X+   }
  1148. X+ 
  1149. X+   if (storage == NULL) {
  1150. X+     puts("bogus storage pointer in get_level!");
  1151. X+     abort();
  1152. X+   }
  1153. X+   return storage;
  1154. X+ }
  1155. X+ 
  1156. X+ /*
  1157. X+  * free the storage for a level
  1158. X+  */
  1159. X+ 
  1160. X+ static free_level(level)
  1161. X+ int level;
  1162. X+ {
  1163. X+   int slot = level_locs[level];
  1164. X+ 
  1165. X+   if (slot < -2-NLEVELS || slot == -1 || slot >= NLEVELS) {
  1166. X+     printf("bug in free_level!\n");
  1167. X+     abort();
  1168. X+   }
  1169. X+ 
  1170. X+   if (slot >= 0)
  1171. X+     slot_in_use[slot] = 0;
  1172. X+   else
  1173. X+     swap_slot_in_use[-2-slot] = 0;
  1174. X+ 
  1175. X+   level_locs[level] = -1;
  1176. X+ }
  1177. X+ 
  1178. X+ #endif /* SWAPPING */
  1179. X+ 
  1180. X+ 
  1181. X+ /*
  1182. X+  *    routine to save the present level into storage
  1183. X+  */
  1184. X+ savelevel()
  1185. X+ {
  1186. X+ #ifdef SWAPPING
  1187. X+   Saved_Level *storage = alloc_level(level);
  1188. X+ #else
  1189. X+   Saved_Level *storage = saved_levels[level];
  1190. X+ #endif
  1191. X+ 
  1192. X+   memcpy(storage->hitp,  hitp,  sizeof(Short_Ary));
  1193. X+   memcpy(storage->mitem, mitem, sizeof(Char_Ary));
  1194. X+   memcpy(storage->item,  item,  sizeof(Char_Ary));
  1195. X+   memcpy(storage->iarg,  iarg,  sizeof(Short_Ary));
  1196. X+   memcpy(storage->know,  know,  sizeof(Char_Ary));
  1197. X+ }
  1198. X+ 
  1199. X+ /*
  1200. X   *    routine to restore a level from storage
  1201. X   */
  1202. X  getlevel()
  1203. X  {
  1204. X! #ifdef SWAPPING
  1205. X!   Saved_Level *storage = get_level(level);
  1206. X! #else
  1207. X!   Saved_Level *storage = saved_levels[level];
  1208. X! #endif
  1209. X  
  1210. X!   memcpy(hitp,  storage->hitp,  sizeof(Short_Ary));
  1211. X!   memcpy(mitem, storage->mitem, sizeof(Char_Ary));
  1212. X!   memcpy(item,  storage->item,  sizeof(Char_Ary));
  1213. X!   memcpy(iarg,  storage->iarg,  sizeof(Short_Ary));
  1214. X!   memcpy(know,  storage->know,  sizeof(Char_Ary));
  1215. X  
  1216. X! #ifdef SWAPPING
  1217. X!   free_level(level);
  1218. X! #endif
  1219. X! }
  1220. X  
  1221. X! /*
  1222. X!     to save the game in a file
  1223. X!  */
  1224. X! static long int zzz=0;
  1225. X! extern int rmst;
  1226. X! extern long lasttime;
  1227. X! savegame(fname)
  1228. X! char *fname;
  1229. X! {
  1230. X!     register int i,k;
  1231. X!     register struct sphere *sp;
  1232. X!     struct stat statbuf;
  1233. X!         Saved_Level *storage;
  1234. X! 
  1235. X!     nosignal=1;  
  1236. X!     lflush();    
  1237. X!     savelevel();
  1238. X!     ointerest();
  1239. X!     if (lcreat(fname, 1) < 0) {
  1240. X!         lcreat((char*)0); 
  1241. X!         lprintf("\nCan't open file <%s> to save game\n",fname);
  1242. X!         nosignal=0;  
  1243. X!         return(-1);
  1244. X      }
  1245. X+ 
  1246. X+     set_score_output();
  1247. X+     lwrite((char*)beenhere,MAXLEVEL+MAXVLEVEL);
  1248. X+     for (k=0; k<MAXLEVEL+MAXVLEVEL; k++)
  1249. X+         if (beenhere[k]) {
  1250. X+ #ifdef SWAPPING
  1251. X+                         storage = get_level(k);
  1252. X+ #else
  1253. X+             storage = saved_levels[k];
  1254. X+ #endif
  1255. X+             lwrite((char*)storage, sizeof(Saved_Level));
  1256. X+                 }
  1257. X+     lwrite((char*)&c[0],100*sizeof(long));
  1258. X+     lprint((long)gtime);        
  1259. X+     lprc(level);
  1260. X+     lprc(playerx);        
  1261. X+     lprc(playery);
  1262. X+     lwrite((char*)iven,26);    
  1263. X+     lwrite((char*)ivenarg,26*sizeof(short));
  1264. X+     lwrite((char*)char_class,20);    
  1265. X+     for (k=0; k<MAXSCROLL; k++)  lprc(scrollname[k][0]);
  1266. X+     for (k=0; k<MAXPOTION; k++)  lprc(potionname[k][0]);
  1267. X+     lwrite((char*)spelknow,SPNUM);         
  1268. X+     lprc(wizard);
  1269. X+     lprc(rmst);        /*    random monster generation counter */
  1270. X+     for (i=0; i<90; i++)    lprc(itm[i].qty);
  1271. X+     lwrite((char*)course,25);            
  1272. X+     lprc(cheat);        
  1273. X+ 
  1274. X+     /* genocide info */
  1275. X+     for (i=0; i<MAXMONST; i++) lprc(monster[i].genocided);
  1276. X+ 
  1277. X+     /* save spheres of annihilation */
  1278. X+     for (sp=spheres; sp; sp=sp->p)
  1279. X+         lwrite((char*)sp,sizeof(struct sphere));    
  1280. X+ 
  1281. X+     time(&zzz);            
  1282. X+     lprint((long)(zzz-initialtime));
  1283. X+     lwrite((char*)&zzz,sizeof(long));
  1284. X+ 
  1285. X+     if (fstat(lfd,&statbuf)< 0) lprint(0L);
  1286. X+     else 
  1287. X+         lprint((long)statbuf.st_ino); /* inode # */
  1288. X+ 
  1289. X+     lwclose();    
  1290. X+     lastmonst[0] = 0;
  1291. X+     lcreat((char*)0);  
  1292. X+     nosignal=0;
  1293. X+     return(0);
  1294. X+ }
  1295. X+ 
  1296. X+ restoregame(fname)
  1297. X+ char *fname;
  1298. X+ {
  1299. X+     register int i,k;
  1300. X+     register struct sphere *sp,*sp2;
  1301. X+     struct stat filetimes;
  1302. X+         Saved_Level *storage;
  1303. X+ 
  1304. X+ 
  1305. X+     cursors(); 
  1306. X+     lprcat("\nRestoring . . .");  
  1307. X+     lflush();
  1308. X+     if (lopen(fname, 1) <= 0) {
  1309. X+         lcreat((char*)0); 
  1310. X+         lprintf("\nCan't open file <%s> to restore game\n",fname);
  1311. X+         nap(2000); 
  1312. X+         c[GOLD]=c[BANKACCOUNT]=0;  
  1313. X+         died(-265); 
  1314. X+         return;
  1315. X+     }
  1316. X+ 
  1317. X+     lrfill((char*)beenhere,MAXLEVEL+MAXVLEVEL);
  1318. X+     for (k=0; k<MAXLEVEL+MAXVLEVEL; k++)
  1319. X+         if (beenhere[k]) {
  1320. X+ #ifdef SWAPPING
  1321. X+                         storage = alloc_level(k);
  1322. X+ #else
  1323. X+             storage = saved_levels[k];
  1324. X+ #endif
  1325. X+             lrfill((char*)storage, sizeof(Saved_Level));
  1326. X+                 }
  1327. X+ 
  1328. X+     lrfill((char*)&c[0],100*sizeof(long));    
  1329. X+     gtime = lrint();
  1330. X+     level = c[CAVELEVEL] = lgetc();
  1331. X+ 
  1332. X+     playerx = lgetc();        
  1333. X+     playery = lgetc();
  1334. X+ 
  1335. X+     lrfill((char*)iven,26);
  1336. X+     lrfill((char*)ivenarg,26*sizeof(short));
  1337. X+     lrfill((char*)char_class,20);        
  1338. X+ 
  1339. X+     for (k=0; k<MAXSCROLL; k++)  scrollname[k][0] = lgetc();
  1340. X+     for (k=0; k<MAXPOTION; k++)  potionname[k][0] = lgetc();
  1341. X+ 
  1342. X+     lrfill((char*)spelknow,SPNUM);        
  1343. X+ 
  1344. X+     wizard = lgetc();
  1345. X+     rmst = lgetc();            /*    random monster creation flag */
  1346. X+ 
  1347. X+     for (i=0; i<90; i++)    
  1348. X+         itm[i].qty = lgetc();
  1349. X+ 
  1350. X+     lrfill((char*)course,25);            
  1351. X+     cheat = lgetc();
  1352. X+ 
  1353. X+     /* genocide info */
  1354. X+     for (i=0; i<MAXMONST; i++) monster[i].genocided=lgetc(); 
  1355. X+ 
  1356. X+     for (sp=0,i=0; i<c[SPHCAST]; i++) {
  1357. X+         sp2 = sp;
  1358. X+         sp = (struct sphere *)malloc(sizeof(struct sphere));
  1359. X+         if (sp==0) { 
  1360. X+             fprintf(stderr, "Can't malloc() for sphere space\n"); 
  1361. X+             break; 
  1362. X+         }
  1363. X+         /* get spheres of annihilation */
  1364. X+         lrfill((char*)sp,sizeof(struct sphere));    
  1365. X+         sp->p=0;    /* null out pointer */
  1366. X+         if (i==0) spheres=sp;    /* beginning of list */
  1367. X+         else sp2->p = sp;
  1368. X+     }
  1369. X+ 
  1370. X+ 
  1371. X+     time(&zzz);
  1372. X+     initialtime = zzz-lrint();
  1373. X+ 
  1374. X+     fstat(fd,&filetimes);/*get the creation and modification time of file*/
  1375. X+ 
  1376. X+     lrfill((char*)&zzz,sizeof(long));    
  1377. X+ 
  1378. X+     zzz += 6;
  1379. X+ #ifndef __TURBOC__
  1380. X+     if (filetimes.st_ctime > zzz) 
  1381. X+         fsorry();    /*file create time    */
  1382. X+     else if (filetimes.st_mtime > zzz) 
  1383. X+         fsorry(); /*    file modify time*/
  1384. X+ #endif
  1385. X+ 
  1386. X+ 
  1387. X+     if (c[HP]<0) { 
  1388. X+         died(284); 
  1389. X+         return; 
  1390. X+     }    /* died a post mortem death */
  1391. X+ 
  1392. X+     oldx = oldy = 0;
  1393. X+ 
  1394. X+     i = lrint();  /* inode # */
  1395. X+ #ifndef __TURBOC__
  1396. X+     if (i && (filetimes.st_ino!=i)) 
  1397. X+         fsorry();    /* different inode number, file was copied */
  1398. X+ #endif
  1399. X+ 
  1400. X+     lrclose();
  1401. X+ 
  1402. X+     if (strcmp(fname,ckpfile) == 0) {
  1403. X+         if (lappend(fname, 1) < 0) 
  1404. X+             fcheat();  
  1405. X+         else { 
  1406. X+             lprc(' '); 
  1407. X+             lwclose(); 
  1408. X+         }
  1409. X+         lcreat((char*)0);
  1410. X+     }
  1411. X+     else if (unlink(fname) < 0) 
  1412. X+         fcheat(); /* can't unlink save file */
  1413. X+ 
  1414. X+     /*    for the greedy cheater checker    */
  1415. X+     /* for (k=0; k<6; k++) if (c[k]>99) greedy();
  1416. X+     if (c[HPMAX]>999 || c[SPELLMAX]>125) greedy(); */
  1417. X+     if (c[LEVEL]==25 && c[EXPERIENCE]>skill[24]) {
  1418. X+         long tmp = c[EXPERIENCE]-skill[24]; /* amount to go up */
  1419. X+         c[EXPERIENCE] = skill[24];
  1420. X+         raiseexperience((long)tmp);
  1421. X+     }
  1422. X+     getlevel();  
  1423. X+     lasttime=gtime;
  1424. X+ 
  1425. X+     for (k=0; k<26; k++) 
  1426. X+         if (iven[k] == OLARNEYE) {
  1427. X+             monstnamelist[DEMONLORD] = '1';
  1428. X+             monstnamelist[DEMONLORD+1] = '2';
  1429. X+             monstnamelist[DEMONLORD+2] = '3';
  1430. X+             monstnamelist[DEMONLORD+3] = '4';
  1431. X+             monstnamelist[DEMONLORD+4] = '5';
  1432. X+             monstnamelist[DEMONLORD+5] = '6';
  1433. X+             monstnamelist[DEMONLORD+6] = '7';
  1434. X+             monstnamelist[DEMONPRINCE] = '9';
  1435. X+             monstnamelist[LUCIFER] = '0';
  1436. X+             break;
  1437. X+         }
  1438. X+ }
  1439. X+ 
  1440. X+ /*
  1441. X+     subroutine to not allow greedy cheaters
  1442. X+  */
  1443. X+ greedy()
  1444. X+ {
  1445. X+     if (wizard) return;
  1446. X+ 
  1447. X+ lprcat("\n\nI am so sorry, but your character is a little TOO good!  Since this\n");
  1448. X+ lprcat("cannot normally happen from an honest game, I must assume that you cheated.\n");
  1449. X+ lprcat("In that you are GREEDY as well as a CHEATER, I cannot allow this game\n");
  1450. X+     lprcat("to continue.\n"); 
  1451. X+     nap(5000);  
  1452. X+     c[GOLD]=c[BANKACCOUNT]=0;  
  1453. X+     died(-267); 
  1454. X+     return;
  1455. X+ }
  1456. X+ 
  1457. X+ /*
  1458. X+     subroutine to not allow altered save files and terminate the attempted
  1459. X+     restart
  1460. X+  */
  1461. X+ fsorry()
  1462. X+ {
  1463. X+     if(cheat) return;
  1464. X+ lprcat("\nSorry, but your savefile has been altered.\n");
  1465. X+ lprcat("However, seeing as I am a good sport, I will let you play.\n");
  1466. X+ lprcat("Be advised though, you won't be placed on the scoreboard.");
  1467. X+     cheat = 1;    
  1468. X+     nap(4000);
  1469. X+ }
  1470. X+ 
  1471. X+ /*
  1472. X+     subroutine to not allow game if save file can't be deleted
  1473. X+  */
  1474. X+ fcheat()
  1475. X+ {
  1476. X+     if (wizard) return;
  1477. X+     if(cheat) return;
  1478. X+ 
  1479. X+ lprcat("\nSorry, but your savefile can't be deleted.  This can only mean\n");
  1480. X+ lprcat("that you tried to CHEAT by protecting the directory the savefile\n");
  1481. X+ lprcat("is in.  Since this is unfair to the rest of the Ularn community, I\n");
  1482. X+ lprcat("cannot let you play this game.\n");
  1483. X+     nap(5000);  
  1484. X+     c[GOLD]=c[BANKACCOUNT]=0;  
  1485. X+     died(-268); 
  1486. X+     return;
  1487. X+ }
  1488. X+ 
  1489. X+ init_cells()
  1490. X+ {
  1491. X+   int i, missing=0;
  1492. X+ 
  1493. X+   for (i=0; i<NLEVELS; i++) {
  1494. X+ #ifdef __MSDOS__
  1495. X+     if (coreleft() <= LEFTOVERS)
  1496. X+       saved_levels[i] = NULL;
  1497. X+     else
  1498. X+ #endif
  1499. X+     saved_levels[i] = (Saved_Level *)malloc(sizeof(Saved_Level));
  1500. X+ #ifdef SWAPPING
  1501. X+     if (saved_levels[i] == NULL) {
  1502. X+       ++missing;
  1503. X+       slot_in_use[i] = -1;
  1504. X+     }
  1505. X+     else slot_in_use[i] = 0;
  1506. X+ 
  1507. X+     level_locs[i] = -1;
  1508. X+     slot_time[i] = 0;
  1509. X+     swap_slot_in_use[i] = -1;
  1510. X+ #else
  1511. X+     if (saved_levels[i] == NULL) died(-285);
  1512. X+ #endif /* SWAPPING */
  1513. X+   }
  1514. X+ 
  1515. X+ /* must have at least one save area available */
  1516. X+ 
  1517. X+ #ifdef SWAPPING
  1518. X+   if (saved_levels[0] == NULL) died(-285);
  1519. X+ 
  1520. X+   if (missing) {
  1521. X+     printf("Couldn't allocate space for %d levels\n", missing);
  1522. X+     nap(2000);
  1523. X+   }
  1524. X+ #endif
  1525. X  }
  1526. Xdiff -c orig/scores.c new/scores.c
  1527. X*** orig/scores.c    Sun Jul 16 01:07:15 1989
  1528. X--- new/scores.c    Sun Jul 16 04:41:43 1989
  1529. X***************
  1530. X*** 63,68 ****
  1531. X--- 63,74 ----
  1532. X  static struct scofmt sco[SCORESIZE];    /* the structure for the scoreboard  */
  1533. X  static struct wscofmt winr[SCORESIZE];    /* struct for the winning scoreboard */
  1534. X  
  1535. X+ #ifdef __MSDOS__
  1536. X+ # define SAMEGUY(rec) (strcmp((rec).who, logname) == 0)
  1537. X+ #else
  1538. X+ # define SAMEGUY(rec) ((rec).suid == userid)
  1539. X+ #endif
  1540. X+ 
  1541. X  static char    *whydead[] = {
  1542. X  "quit",                     /* 0 */
  1543. X  "suspended", 
  1544. X***************
  1545. X*** 106,112 ****
  1546. X--- 112,122 ----
  1547. X  {
  1548. X      FILE *fp;
  1549. X  
  1550. X+ #ifdef __MSDOS__
  1551. X+     if ((fp = fopen(scorefile, "rb")) == (FILE *)NULL) {
  1552. X+ #else
  1553. X      if ((fp = fopen(scorefile, "r")) == (FILE *)NULL) {
  1554. X+ #endif
  1555. X          fprintf(stderr, "Can't open scorefile for reading\n"); 
  1556. X          fflush(stderr);
  1557. X          return(-1); 
  1558. X***************
  1559. X*** 139,145 ****
  1560. X--- 149,159 ----
  1561. X  {
  1562. X      FILE *fp;
  1563. X  
  1564. X+ #ifdef __MSDOS__
  1565. X+     if ((fp = fopen(scorefile, "wb")) == (FILE *)NULL) {
  1566. X+ #else
  1567. X      if ((fp = fopen(scorefile, "w")) == (FILE *)NULL) {
  1568. X+ #endif
  1569. X          lprcat("Can't open scorefile for writing\n"); 
  1570. X          lflush();
  1571. X          return(-1); 
  1572. X***************
  1573. X*** 203,209 ****
  1574. X          return(0);    /* can't find scoreboard */
  1575. X  
  1576. X      for (i = 0; i < SCORESIZE; i++)    /* search through winners scoreboard */
  1577. X!         if (winr[i].suid == userid)
  1578. X              if (winr[i].score > 0) {
  1579. X                  c[HARDGAME] = winr[i].hardlev + 1;
  1580. X                  outstanding_taxes = winr[i].taxes;
  1581. X--- 217,223 ----
  1582. X          return(0);    /* can't find scoreboard */
  1583. X  
  1584. X      for (i = 0; i < SCORESIZE; i++)    /* search through winners scoreboard */
  1585. X!         if (SAMEGUY(winr[i]))
  1586. X              if (winr[i].score > 0) {
  1587. X                  c[HARDGAME] = winr[i].hardlev + 1;
  1588. X                  outstanding_taxes = winr[i].taxes;
  1589. X***************
  1590. X*** 234,240 ****
  1591. X      for (i = 0; i < SCORESIZE; i++)
  1592. X  
  1593. X          /* look for players winning entry */
  1594. X!         if (winr[i].suid == userid)
  1595. X  
  1596. X              /* search for a winning entry for the player */ {
  1597. X              if (winr[i].score > 0) 
  1598. X--- 248,254 ----
  1599. X      for (i = 0; i < SCORESIZE; i++)
  1600. X  
  1601. X          /* look for players winning entry */
  1602. X!         if (SAMEGUY(winr[i]))
  1603. X  
  1604. X              /* search for a winning entry for the player */ {
  1605. X              if (winr[i].score > 0) 
  1606. X***************
  1607. X*** 281,287 ****
  1608. X              if (p->order == i) {
  1609. X                  if (p->score) {
  1610. X                    count++;
  1611. X!                   printf("%-10ld%8d%8d Mobuls  (%s) %s\n",
  1612. X                      (long)p->score,
  1613. X                      p->hardlev, 
  1614. X                      p->timeused, 
  1615. X--- 295,301 ----
  1616. X              if (p->order == i) {
  1617. X                  if (p->score) {
  1618. X                    count++;
  1619. X!                   printf("%-10ld%8d%8ld Mobuls  (%s) %s\n",
  1620. X                      (long)p->score,
  1621. X                      p->hardlev, 
  1622. X                      p->timeused, 
  1623. X***************
  1624. X*** 490,496 ****
  1625. X  
  1626. X      if (winner) {
  1627. X          for (i = 0; i < SCORESIZE; i++)
  1628. X!             if (sco[i].suid == userid)
  1629. X                  sco[i].score = 0;
  1630. X          taxes = score * TAXRATE;
  1631. X          score += 100000 * c[HARDGAME];    /* bonus for winning */
  1632. X--- 504,510 ----
  1633. X  
  1634. X      if (winner) {
  1635. X          for (i = 0; i < SCORESIZE; i++)
  1636. X!             if (SAMEGUY(sco[i]))
  1637. X                  sco[i].score = 0;
  1638. X          taxes = score * TAXRATE;
  1639. X          score += 100000 * c[HARDGAME];    /* bonus for winning */
  1640. X***************
  1641. X*** 497,503 ****
  1642. X  
  1643. X  /* if he has a slot on the winning scoreboard update it if greater score*/
  1644. X          for (i = 0; i < SCORESIZE; i++) 
  1645. X!             if (winr[i].suid == userid) { 
  1646. X                  new1sub(score, i, whoo, taxes); 
  1647. X                  return; 
  1648. X              }
  1649. X--- 511,517 ----
  1650. X  
  1651. X  /* if he has a slot on the winning scoreboard update it if greater score*/
  1652. X          for (i = 0; i < SCORESIZE; i++) 
  1653. X!             if (SAMEGUY(winr[i])) {
  1654. X                  new1sub(score, i, whoo, taxes); 
  1655. X                  return; 
  1656. X              }
  1657. X***************
  1658. X*** 511,517 ****
  1659. X      } else if (!cheat) /* for not winning scoreboard */ {
  1660. X      /* if he has a slot on the scoreboard update it if greater score */
  1661. X          for (i = 0; i < SCORESIZE; i++) 
  1662. X!             if (sco[i].suid == userid) { 
  1663. X                  new2sub(score, i, whoo, whyded); 
  1664. X                  return; 
  1665. X              }
  1666. X--- 525,531 ----
  1667. X      } else if (!cheat) /* for not winning scoreboard */ {
  1668. X      /* if he has a slot on the scoreboard update it if greater score */
  1669. X          for (i = 0; i < SCORESIZE; i++) 
  1670. X!             if (SAMEGUY(sco[i])) {
  1671. X                  new2sub(score, i, whoo, whyded); 
  1672. X                  return; 
  1673. X              }
  1674. Xdiff -c orig/signal.c new/signal.c
  1675. X*** orig/signal.c    Sun Jul 16 01:00:34 1989
  1676. X--- new/signal.c    Sun Jul 16 04:38:11 1989
  1677. X***************
  1678. X*** 5,10 ****
  1679. X--- 5,16 ----
  1680. X  #define BIT(a) (1<<((a)-1))
  1681. X  extern char savefilename[],wizard,predostuff,nosignal;
  1682. X  
  1683. X+ #ifdef __MSDOS__
  1684. X+ # define VOID void
  1685. X+ #else
  1686. X+ # define VOID
  1687. X+ #endif
  1688. X+ 
  1689. X  s2choose()    /* text to be displayed if ^C during intro screen */
  1690. X  {
  1691. X      cursor(1,24); 
  1692. X***************
  1693. X*** 16,22 ****
  1694. X      lflush(); 
  1695. X  }
  1696. X  
  1697. X! cntlc()    /* what to do for a ^C */
  1698. X  {
  1699. X      if (nosignal) 
  1700. X          return;    /* don't do anything if inhibited */
  1701. X--- 22,28 ----
  1702. X      lflush(); 
  1703. X  }
  1704. X  
  1705. X! VOID cntlc()    /* what to do for a ^C */
  1706. X  {
  1707. X      if (nosignal) 
  1708. X          return;    /* don't do anything if inhibited */
  1709. X***************
  1710. X*** 27,33 ****
  1711. X--- 33,41 ----
  1712. X      else 
  1713. X          showplayer();
  1714. X      lflush();
  1715. X+ #ifndef __MSDOS__
  1716. X      signal(SIGQUIT,cntlc);    
  1717. X+ #endif
  1718. X      signal(SIGINT,cntlc);
  1719. X  }
  1720. X  
  1721. X***************
  1722. X*** 70,106 ****
  1723. X  /*
  1724. X   *    subroutine to issue the needed signal traps  called from main()
  1725. X   */
  1726. X! sigill()  { sigpanic(SIGILL); }     
  1727. X  sigtrap() { sigpanic(SIGTRAP); }
  1728. X  sigiot()  { sigpanic(SIGIOT); }   
  1729. X  sigemt()  { sigpanic(SIGEMT); }
  1730. X- sigfpe()  { sigpanic(SIGFPE); }   
  1731. X  sigbus()  { sigpanic(SIGBUS); }
  1732. X- sigsegv() { sigpanic(SIGSEGV); }  
  1733. X  sigsys()  { sigpanic(SIGSYS); }
  1734. X  sigpipe() { sigpanic(SIGPIPE); }  
  1735. X! sigterm() { sigpanic(SIGTERM); }
  1736. X  
  1737. X  sigsetup()
  1738. X  {
  1739. X-     signal(SIGQUIT, cntlc);         
  1740. X      signal(SIGINT,  cntlc); 
  1741. X      signal(SIGKILL, SIG_IGN);        
  1742. X      signal(SIGHUP,  sgam);
  1743. X-     signal(SIGILL,  sigill);        
  1744. X      signal(SIGTRAP, sigtrap);
  1745. X      signal(SIGIOT,  sigiot);        
  1746. X      signal(SIGEMT,  sigemt);
  1747. X-     signal(SIGFPE,  sigfpe);        
  1748. X      signal(SIGBUS,  sigbus);
  1749. X-     signal(SIGSEGV, sigsegv);        
  1750. X      signal(SIGSYS,  sigsys);
  1751. X      signal(SIGPIPE, sigpipe);        
  1752. X-     signal(SIGTERM, sigterm);
  1753. X  #ifdef SIGTSTP
  1754. X      signal(SIGTSTP,tstop);        
  1755. X      signal(SIGSTOP,tstop);
  1756. X  #endif /* SIGTSTP */
  1757. X  }
  1758. X  
  1759. X  #ifdef BSD    /* for BSD UNIX? */
  1760. X--- 78,120 ----
  1761. X  /*
  1762. X   *    subroutine to issue the needed signal traps  called from main()
  1763. X   */
  1764. X! VOID sigill()  { sigpanic(SIGILL); }     
  1765. X! VOID sigfpe()  { sigpanic(SIGFPE); }   
  1766. X! VOID sigsegv() { sigpanic(SIGSEGV); }  
  1767. X! VOID sigterm() { sigpanic(SIGTERM); }
  1768. X! 
  1769. X! #ifndef __MSDOS__
  1770. X  sigtrap() { sigpanic(SIGTRAP); }
  1771. X  sigiot()  { sigpanic(SIGIOT); }   
  1772. X  sigemt()  { sigpanic(SIGEMT); }
  1773. X  sigbus()  { sigpanic(SIGBUS); }
  1774. X  sigsys()  { sigpanic(SIGSYS); }
  1775. X  sigpipe() { sigpanic(SIGPIPE); }  
  1776. X! #endif
  1777. X  
  1778. X  sigsetup()
  1779. X  {
  1780. X      signal(SIGINT,  cntlc); 
  1781. X+     signal(SIGILL,  sigill);        
  1782. X+     signal(SIGFPE,  sigfpe);        
  1783. X+     signal(SIGSEGV, sigsegv);        
  1784. X+     signal(SIGTERM, sigterm);
  1785. X+ 
  1786. X+ #ifndef __MSDOS__
  1787. X+     signal(SIGQUIT, cntlc);         
  1788. X      signal(SIGKILL, SIG_IGN);        
  1789. X      signal(SIGHUP,  sgam);
  1790. X      signal(SIGTRAP, sigtrap);
  1791. X      signal(SIGIOT,  sigiot);        
  1792. X      signal(SIGEMT,  sigemt);
  1793. X      signal(SIGBUS,  sigbus);
  1794. X      signal(SIGSYS,  sigsys);
  1795. X      signal(SIGPIPE, sigpipe);        
  1796. X  #ifdef SIGTSTP
  1797. X      signal(SIGTSTP,tstop);        
  1798. X      signal(SIGSTOP,tstop);
  1799. X  #endif /* SIGTSTP */
  1800. X+ #endif /* __MSDOS__ */
  1801. X  }
  1802. X  
  1803. X  #ifdef BSD    /* for BSD UNIX? */
  1804. X***************
  1805. X*** 137,142 ****
  1806. X--- 151,157 ----
  1807. X      "","","","" };
  1808. X  
  1809. X  #else  /* SYSV */
  1810. X+ # ifndef __MSDOS__
  1811. X  static char *signame[NSIG] = { 
  1812. X      "",
  1813. X      "SIGHUP",  /*    1     hangup */
  1814. X***************
  1815. X*** 159,164 ****
  1816. X--- 174,207 ----
  1817. X      "SIGCLD",  /*    18     child death */
  1818. X      "SIGPWR"   /*    19     power fail */
  1819. X  };
  1820. X+ # else /* __MSDOS__ */
  1821. X+ static char *signame[] = {
  1822. X+   "",         /*  0 */
  1823. X+   "",         /*  1 */
  1824. X+   "SIGINT",   /*  2 */
  1825. X+   "",         /*  3 */
  1826. X+   "SIGILL",   /*  4 */
  1827. X+   "",         /*  5 */
  1828. X+   "",         /*  6 */
  1829. X+   "",         /*  7 */
  1830. X+   "SIGFPE",   /*  8 */
  1831. X+   "",         /*  9 */
  1832. X+   "",         /* 10 */
  1833. X+   "SIGSEGV",  /* 11 */
  1834. X+   "",         /* 12 */
  1835. X+   "",         /* 13 */
  1836. X+   "",         /* 14 */
  1837. X+   "SIGTERM",  /* 15 */
  1838. X+   "SIGUSR1",  /* 16 */
  1839. X+   "SIGUSR2",  /* 17 */
  1840. X+   "",         /* 18 */
  1841. X+   "",         /* 19 */
  1842. X+   "SIGUSR3",  /* 20 */
  1843. X+   "SIGBREAK", /* 21 */
  1844. X+   "SIGABRT",  /* 22 */
  1845. X+ };
  1846. X+ # endif /* __MSDOS__ */
  1847. X+ 
  1848. X  #endif /* BSD */
  1849. X  
  1850. X  /*
  1851. X***************
  1852. X*** 173,177 ****
  1853. X--- 216,224 ----
  1854. X      sleep(2);
  1855. X      sncbr();
  1856. X      savegame(savefilename); 
  1857. X+ #ifdef __MSDOS__
  1858. X+         exit(10);
  1859. X+ #else
  1860. X      kill(getpid(),sig); /* this will terminate us */
  1861. X+ #endif
  1862. X  }
  1863. Xdiff -c orig/store.c new/store.c
  1864. X*** orig/store.c    Sun Jul 16 01:07:20 1989
  1865. X--- new/store.c    Sun Jul 16 04:43:41 1989
  1866. X***************
  1867. X*** 216,227 ****
  1868. X                  outofstock(); 
  1869. X              else if (pocketfull()) 
  1870. X                  handsfull(); 
  1871. X!             else if (c[GOLD] < itm[i].price*10) 
  1872. X                  nogold(); 
  1873. X              else {     
  1874. X                  if (itm[i].mem != 0) 
  1875. X                      *itm[i].mem[itm[i].arg] = ' ';
  1876. X!                 c[GOLD] -= itm[i].price*10;
  1877. X                  itm[i].qty--;  
  1878. X                  take(itm[i].obj,itm[i].arg);
  1879. X                  if (itm[i].qty==0) 
  1880. X--- 216,227 ----
  1881. X                  outofstock(); 
  1882. X              else if (pocketfull()) 
  1883. X                  handsfull(); 
  1884. X!             else if (c[GOLD] < itm[i].price*10L) 
  1885. X                  nogold(); 
  1886. X              else {     
  1887. X                  if (itm[i].mem != 0) 
  1888. X                      *itm[i].mem[itm[i].arg] = ' ';
  1889. X!                 c[GOLD] -= itm[i].price*10L;
  1890. X                  itm[i].qty--;  
  1891. X                  take(itm[i].obj,itm[i].arg);
  1892. X                  if (itm[i].qty==0) 
  1893. X***************
  1894. X*** 284,290 ****
  1895. X      }
  1896. X      else lprintf("%s",objectname[itm[i].obj]);
  1897. X      cursor( j+31,k );  
  1898. X!     lprintf("%6d",(long)(itm[i].price*10));
  1899. X  }
  1900. X  
  1901. X  
  1902. X--- 284,290 ----
  1903. X      }
  1904. X      else lprintf("%s",objectname[itm[i].obj]);
  1905. X      cursor( j+31,k );  
  1906. X!     lprintf("%6d",((long)itm[i].price*10));
  1907. X  }
  1908. X  
  1909. X  
  1910. X***************
  1911. X*** 464,470 ****
  1912. X  /*
  1913. X   *    for the first national bank of Ularn
  1914. X   */
  1915. X! int lasttime=0;    /* last time he was in bank */
  1916. X  obank()
  1917. X  {
  1918. X      banktitle("    Welcome to the First National Bank of Ularn.");
  1919. X--- 464,470 ----
  1920. X  /*
  1921. X   *    for the first national bank of Ularn
  1922. X   */
  1923. X! long lasttime=0;    /* last time he was in bank */
  1924. X  obank()
  1925. X  {
  1926. X      banktitle("    Welcome to the First National Bank of Ularn.");
  1927. X***************
  1928. X*** 626,640 ****
  1929. X                  for (i=0; i<26; i++) {     
  1930. X                      if (gemvalue[i]) {
  1931. X                          if (iven[i]==OLARNEYE) {
  1932. X!                         monstnamelist[DEMONLORD]=' ';
  1933. X!                         monstnamelist[DEMONLORD+1]=' ';
  1934. X!                         monstnamelist[DEMONLORD+2]= ' ';
  1935. X!                         monstnamelist[DEMONLORD+3]= ' ';
  1936. X!                         monstnamelist[DEMONLORD+4]= ' ';
  1937. X!                         monstnamelist[DEMONLORD+5]= ' ';
  1938. X!                         monstnamelist[DEMONLORD+6]= ' ';
  1939. X!                         monstnamelist[DEMONPRINCE]= ' ';
  1940. X!                         monstnamelist[LUCIFER] = ' ';
  1941. X                          }
  1942. X                          c[GOLD]+=gemvalue[i];  
  1943. X                          iven[i]=0;
  1944. X--- 626,641 ----
  1945. X                  for (i=0; i<26; i++) {     
  1946. X                      if (gemvalue[i]) {
  1947. X                          if (iven[i]==OLARNEYE) {
  1948. X!                                                   char c = objnamelist[0];
  1949. X!                           monstnamelist[DEMONLORD  ]=c;
  1950. X!                           monstnamelist[DEMONLORD+1]=c;
  1951. X!                           monstnamelist[DEMONLORD+2]=c;
  1952. X!                           monstnamelist[DEMONLORD+3]=c;
  1953. X!                           monstnamelist[DEMONLORD+4]=c;
  1954. X!                           monstnamelist[DEMONLORD+5]=c;
  1955. X!                           monstnamelist[DEMONLORD+6]=c;
  1956. X!                           monstnamelist[DEMONPRINCE]=c;
  1957. X!                           monstnamelist[LUCIFER]    =c;
  1958. X                          }
  1959. X                          c[GOLD]+=gemvalue[i];  
  1960. X                          iven[i]=0;
  1961. X***************
  1962. X*** 651,665 ****
  1963. X                      break;
  1964. X                  }
  1965. X                  if (iven[i]==OLARNEYE) {
  1966. X!                     monstnamelist[DEMONLORD]=' ';
  1967. X!                     monstnamelist[DEMONLORD+1]=' ';
  1968. X!                     monstnamelist[DEMONLORD+2]= ' ';
  1969. X!                     monstnamelist[DEMONLORD+3]= ' ';
  1970. X!                     monstnamelist[DEMONLORD+4]= ' ';
  1971. X!                     monstnamelist[DEMONLORD+5]= ' ';
  1972. X!                     monstnamelist[DEMONLORD+6]= ' ';
  1973. X!                     monstnamelist[DEMONPRINCE]= ' ';
  1974. X!                     monstnamelist[LUCIFER] = ' ';
  1975. X                  }
  1976. X                  c[GOLD]+=gemvalue[i];  
  1977. X                  iven[i]=0;
  1978. X--- 652,667 ----
  1979. X                      break;
  1980. X                  }
  1981. X                  if (iven[i]==OLARNEYE) {
  1982. X!                     char c = objnamelist[0];
  1983. X!                     monstnamelist[DEMONLORD  ] = c;
  1984. X!                     monstnamelist[DEMONLORD+1] = c;
  1985. X!                     monstnamelist[DEMONLORD+2] = c;
  1986. X!                     monstnamelist[DEMONLORD+3] = c;
  1987. X!                     monstnamelist[DEMONLORD+4] = c;
  1988. X!                     monstnamelist[DEMONLORD+5] = c;
  1989. X!                     monstnamelist[DEMONLORD+6] = c;
  1990. X!                     monstnamelist[DEMONPRINCE] = c;
  1991. X!                     monstnamelist[LUCIFER]     = c;
  1992. X                  }
  1993. X                  c[GOLD]+=gemvalue[i];  
  1994. X                  iven[i]=0;
  1995. X***************
  1996. X*** 685,691 ****
  1997. X  appraise(gemstone)
  1998. X  int gemstone;
  1999. X  {
  2000. X!     register int j,amt;
  2001. X  
  2002. X      for (j=0; j<26; j++)
  2003. X          if (iven[j]==gemstone) {
  2004. X--- 687,694 ----
  2005. X  appraise(gemstone)
  2006. X  int gemstone;
  2007. X  {
  2008. X!     register int j;
  2009. X!         register long amt;
  2010. X  
  2011. X      for (j=0; j<26; j++)
  2012. X          if (iven[j]==gemstone) {
  2013. X***************
  2014. X*** 731,737 ****
  2015. X  
  2016. X  otradepost()
  2017. X  {
  2018. X!     int i,j,value,isub,izarg;
  2019. X  
  2020. X      dnditm = dndcount = 0;
  2021. X      nosignal = 1; /* disable signals */
  2022. X--- 734,741 ----
  2023. X  
  2024. X  otradepost()
  2025. X  {
  2026. X!     int i,j,isub,izarg;
  2027. X!         long value;
  2028. X  
  2029. X      dnditm = dndcount = 0;
  2030. X      nosignal = 1; /* disable signals */
  2031. X***************
  2032. X*** 1116,1121 ****
  2033. X--- 1120,1126 ----
  2034. X          lprcat("\nSo, what are ya? ");
  2035. X          lflush();
  2036. X  
  2037. X+         i=0;
  2038. X          while (i<'a' || i>'h') 
  2039. X              i=getcharacter();
  2040. X  
  2041. Xdiff -c orig/tok.c new/tok.c
  2042. X*** orig/tok.c    Sun Jul 16 01:07:17 1989
  2043. X--- new/tok.c    Sun Jul 16 04:49:51 1989
  2044. X***************
  2045. X*** 43,57 ****
  2046. X          if (ckpflag)
  2047. X              /* check for periodic checkpointing */
  2048. X              if ( c[BYTESIN] == 1 || (c[BYTESIN] % 400) == 0) {
  2049. X                  wait((int *)0);/* wait for other forks to finish */
  2050. X                  if (fork() == 0) { 
  2051. X                      savegame(ckpfile); 
  2052. X                      exit(0); 
  2053. X                  }
  2054. X              }
  2055. X          flushall();
  2056. X!         if (read(0,&cc,1) != 1) 
  2057. X!             return(lastok = -1);
  2058. X  
  2059. X          if (cc == '!')    /* shell escape */
  2060. X          {     
  2061. X--- 43,60 ----
  2062. X          if (ckpflag)
  2063. X              /* check for periodic checkpointing */
  2064. X              if ( c[BYTESIN] == 1 || (c[BYTESIN] % 400) == 0) {
  2065. X+ #ifdef __MSDOS__
  2066. X+                 savegame(ckpfile);
  2067. X+ #else
  2068. X                  wait((int *)0);/* wait for other forks to finish */
  2069. X                  if (fork() == 0) { 
  2070. X                      savegame(ckpfile); 
  2071. X                      exit(0); 
  2072. X                  }
  2073. X+ #endif /* __MSDOS__ */
  2074. X              }
  2075. X          flushall();
  2076. X!         cc = getcharacter();
  2077. X  
  2078. X          if (cc == '!')    /* shell escape */
  2079. X          {     
  2080. X***************
  2081. X*** 60,65 ****
  2082. X--- 63,71 ----
  2083. X              sncbr();
  2084. X              cl_dn(0,0);
  2085. X              lflush();
  2086. X+ #ifdef __MSDOS__
  2087. X+             system("COMMAND");
  2088. X+ #else
  2089. X              if ((ic=fork())==0) {
  2090. X                  execl("/bin/csh", "/bin/csh", (char *)0);    
  2091. X                  exit(1);
  2092. X***************
  2093. X*** 73,78 ****
  2094. X--- 79,85 ----
  2095. X                  fflush(stderr);
  2096. X                  sleep(2);
  2097. X              }
  2098. X+ #endif
  2099. X              setscroll();
  2100. X              scbr();
  2101. X              return(lastok = 'L'-64);    /* redisplay screen */
  2102. X***************
  2103. X*** 105,115 ****
  2104. X--- 112,126 ----
  2105. X          } /* gobble up the byte */
  2106. X      }
  2107. X  #else /* SYSV */
  2108. X+ # ifdef __MSDOS__
  2109. X+     while (kbhit()) (void)getch();
  2110. X+ # else
  2111. X  #  ifdef TCIFLUSH
  2112. X      tcflush(0, TCIFLUSH);        /* SYSV w/POSIX 1003 tcflush() */
  2113. X  #  else
  2114. X          ioctl(0, TCFLSH);        /* standard ioctl */
  2115. X  #  endif /* TCIFLUSH */
  2116. X+ # endif /* __MSDOS__ */
  2117. X  #endif /* BSD */
  2118. X  }
  2119. X  
  2120. X***************
  2121. X*** 120,126 ****
  2122. X  sethard(hard)
  2123. X  int hard;
  2124. X  {
  2125. X!     register int j,k,i;
  2126. X  
  2127. X      if (restorflag==0)  {      /* don't set c[HARDGAME] if restoring game */
  2128. X          if (hashewon() == 0) {
  2129. X--- 131,138 ----
  2130. X  sethard(hard)
  2131. X  int hard;
  2132. X  {
  2133. X!     register int j,k;
  2134. X!     long i;
  2135. X  
  2136. X      if (restorflag==0)  {      /* don't set c[HARDGAME] if restoring game */
  2137. X          if (hashewon() == 0) {
  2138. X***************
  2139. X*** 130,136 ****
  2140. X          else  if (hard > c[HARDGAME]) c[HARDGAME] = hard;
  2141. X      }
  2142. X  
  2143. X!     if (k=c[HARDGAME])
  2144. X          for (j=0; j<=MAXMONST+8; j++) {
  2145. X              i = ((6+k)*monster[j].hitpoints+1)/6;
  2146. X              monster[j].hitpoints = (i<0) ? 32767 : i;
  2147. X--- 142,148 ----
  2148. X          else  if (hard > c[HARDGAME]) c[HARDGAME] = hard;
  2149. X      }
  2150. X  
  2151. X!     if ((k=c[HARDGAME])!=0)
  2152. X          for (j=0; j<=MAXMONST+8; j++) {
  2153. X              i = ((6+k)*monster[j].hitpoints+1)/6;
  2154. X              monster[j].hitpoints = (i<0) ? 32767 : i;
  2155. X***************
  2156. X*** 155,163 ****
  2157. X      extern int char_picked;
  2158. X      int flag=1;
  2159. X  
  2160. X!     if (lopen(optsfile) < 0) {
  2161. X          strcpy(logname,loginname); 
  2162. X!         return; /* user name if no character name */
  2163. X      }
  2164. X      i = " ";
  2165. X      while (*i) {
  2166. X--- 167,175 ----
  2167. X      extern int char_picked;
  2168. X      int flag=1;
  2169. X  
  2170. X!     if (lopen(optsfile, 0) < 0) {
  2171. X          strcpy(logname,loginname); 
  2172. X!         return -1; /* user name if no character name */
  2173. X      }
  2174. X      i = " ";
  2175. X      while (*i) {
  2176. X***************
  2177. X*** 167,172 ****
  2178. X--- 179,191 ----
  2179. X          case 'b':    
  2180. X              if (strcmp(i,"bold-off") == 0)  
  2181. X                  boldon=0;
  2182. X+ #ifdef __MSDOS__
  2183. X+             else if (strcmp(i, "background:") == 0) {
  2184. X+                 extern int bg_color;
  2185. X+                 if ((i = lgetw())==0) break;
  2186. X+                 bg_color = parse_color(i, bg_color);
  2187. X+             }
  2188. X+ #endif
  2189. X              break;
  2190. X  
  2191. X          case 'e':    
  2192. X***************
  2193. X*** 177,182 ****
  2194. X--- 196,208 ----
  2195. X          case 'f':    
  2196. X              if (strcmp(i,"female") == 0)    
  2197. X                  sex=0; /* male or female */
  2198. X+ #ifdef __MSDOS__
  2199. X+             else if (strcmp(i, "foreground:") == 0) {
  2200. X+                 extern int fg_color;
  2201. X+                 if ((i = lgetw())==0) break;
  2202. X+                 fg_color = parse_color(i, fg_color);
  2203. X+             }
  2204. X+ #endif
  2205. X              break;
  2206. X  
  2207. X              /* name favorite monster */
  2208. X***************
  2209. X*** 210,215 ****
  2210. X--- 236,247 ----
  2211. X                  nowelcome=1;
  2212. X              else if (strcmp(i,"no-beep") == 0) 
  2213. X                  nobeep=1;
  2214. X+ #ifdef __MSDOS__
  2215. X+             else if (strcmp(i, "nansi") == 0) {
  2216. X+                 extern int nansi;
  2217. X+                 nansi=1;
  2218. X+             }
  2219. X+ #endif
  2220. X              break;
  2221. X  
  2222. X          case 'c':
  2223. X***************
  2224. X*** 247,253 ****
  2225. X--- 279,366 ----
  2226. X                  flag=0;
  2227. X              }
  2228. X              break;
  2229. X+         case 'g':
  2230. X+             if (strcmp(i, "graphics:") == 0) {
  2231. X+                 int c;
  2232. X+                 if ((i=lgetw())==0) break;
  2233. X+                 c = atoi(i);
  2234. X+                 if (c <= 0 || c > 255) break;
  2235. X+                 objnamelist[0] = c;
  2236. X+                 monstnamelist[INVISIBLESTALKER] = c;
  2237. X+                 monstnamelist[DEMONLORD  ] = c;
  2238. X+                 monstnamelist[DEMONLORD+1] = c;
  2239. X+                 monstnamelist[DEMONLORD+2] = c;
  2240. X+                 monstnamelist[DEMONLORD+3] = c;
  2241. X+                 monstnamelist[DEMONLORD+4] = c;
  2242. X+                 monstnamelist[DEMONLORD+5] = c;
  2243. X+                 monstnamelist[DEMONLORD+6] = c;
  2244. X+                 monstnamelist[DEMONPRINCE] = c;
  2245. X+                 monstnamelist[LUCIFER]     = c;
  2246. X+                 objnamelist[OTRAPARROWIV]  = c;
  2247. X+                 objnamelist[OIVDARTRAP]    = c;
  2248. X+                 objnamelist[OIVTRAPDOOR]   = c;
  2249. X+                 objnamelist[OIVTELETRAP]   = c;
  2250. X+                 if ((i=lgetw())==0) break;
  2251. X+                 c = atoi(i);
  2252. X+                 if (c <= 0 || c > 255) break;
  2253. X+                 objnamelist[OWALL] = c;
  2254. X+             }
  2255. X+             break;
  2256. X+ #ifdef __MSDOS__
  2257. X+         case 'k':
  2258. X+             if (strcmp(i, "keypad") == 0) {
  2259. X+                 extern int keypad;
  2260. X+                 keypad = 1;
  2261. X+             }
  2262. X+             break;
  2263. X+         case 'r':
  2264. X+             if (strcmp(i, "rawio") == 0) {
  2265. X+                 extern int rawio;
  2266. X+                 rawio = 1;
  2267. X+             }
  2268. X+             break;
  2269. X+         case 'l':
  2270. X+             if (strcmp(i, "larn-path:") == 0) {
  2271. X+                 extern char larnpath[];
  2272. X+                 if ((i=lgetw())==0) break;
  2273. X+                 if (strlen(i)>=SAVEFILENAMESIZE-1)
  2274. X+                     i[SAVEFILENAMESIZE-2]=0;
  2275. X+                 strcpy(larnpath,i); 
  2276. X+                 i = larnpath + strlen(larnpath) - 1;
  2277. X+                 if (i >= larnpath &&
  2278. X+                     !(*i == '/' || *i == '\\')) {
  2279. X+                     *++i = '\\';
  2280. X+                     *++i = '\0';
  2281. X+                 }
  2282. X+                 i = " ";
  2283. X+             }
  2284. X+             break;
  2285. X+ 
  2286. X+ #endif
  2287. X          };
  2288. X      }
  2289. X      if (flag)  strcpy(logname,loginname);
  2290. X+     return 0;
  2291. X  }
  2292. X+ 
  2293. X+ 
  2294. X+ #ifdef __MSDOS__
  2295. X+ 
  2296. X+ static char *colors[8] = { "bla", "r", "g", "y", "blu", "m", "c", "w" };
  2297. X+ 
  2298. X+ int parse_color(name, old)
  2299. X+ char *name;
  2300. X+ int old;
  2301. X+ {
  2302. X+     int i;
  2303. X+ 
  2304. X+     for (i=0; i<8; i++)
  2305. X+         if (strncmp(name, colors[i], strlen(colors[i])) == 0) return i;
  2306. X+ 
  2307. X+     printf("Unknown color name %s\n", name);
  2308. X+     nap(2000);
  2309. X+ 
  2310. X+     return old;
  2311. X+ }
  2312. X+ 
  2313. X+ #endif  /* __MSDOS__ */
  2314. Xdiff -c orig/ularn.lnk new/ularn.lnk
  2315. X*** orig/ularn.lnk    Sun Jul 16 05:19:29 1989
  2316. X--- new/ularn.lnk    Sun Jul 16 04:59:42 1989
  2317. X***************
  2318. X*** 0 ****
  2319. X--- 1,8 ----
  2320. X+ c:\l\tc\lib\c0h.obj +
  2321. X+ bill.obj config.obj create.obj data.obj diag.obj display.obj +
  2322. X+ fortune.obj global.obj help.obj io.obj main.obj monster.obj +
  2323. X+ moreobj.obj movem.obj object.obj regen.obj savelev.obj scores.obj +
  2324. X+ signal.obj store.obj tok.obj nap.obj
  2325. X+ ularn.exe
  2326. X+ ularn.map
  2327. X+ c:\l\tc\lib\emu.lib c:\l\tc\lib\mathh.lib c:\l\tc\lib\ch.lib
  2328. SHAR_EOF
  2329. if test 55551 -ne "`wc -c < 'patch02.2'`"
  2330. then
  2331.     echo shar: error transmitting "'patch02.2'" '(should have been 55551 characters)'
  2332. fi
  2333. fi # end of overwriting check
  2334. #    End of shell archive
  2335. exit 0
  2336.